<template>
  <!-- #ifdef H5 -->
    <mtitles  title="充值" bgColor="#56BF7A" :delta='3' color="#fff" isBack></mtitles>
    <!-- #endif -->
	<view class="containbox">
			<view class="topfill"></view>
			<view class="centerSection p_rlt padding-top-lg">
				<view class="subTopbox">
					<view class="in_putbox padding-lr">
						<view class="input2_itm flex align-center">
							<view class="text-c6 iptit">
								充值门店
							</view>
							<!-- <input class="in_input flex-sub text-left" type="text" disabled placeholder-class="plashd" v-model="shopName" placeholder="请选择门店" /> -->
							<view class="flex-sub padding-right-xs" @click.stop="mnavTo('/pages/others/positionStores/positionStores?source=recharge')">
								{{ rechargeShop.name || '请选择门店' }}
							</view>
						</view>
						<view class="input2_itm flex align-center">
							<view class="text-c6 iptit">
								当前余额
							</view>
							<view class="flex-sub text-left text-nred">
								{{balance||'0'}}元
							</view>
						</view>
						<view class="input2_itm flex align-center">
							<view class="text-c6 iptit">
								推荐技师
							</view>
							<input class="in_input flex-sub text-left" type="number" v-model="techNo" placeholder-class="plashd" placeholder="请输入技师编号" />
						</view>
					</view>
				</view>
				<scroll-view scroll-y="true" class="rechaScrBox margin-top-sm">
					<view class="padding-lr-sm">
						<view v-for="(item,index) in 6" :key="index" :class="{act:rechClass==index}" @click="rechClass=index" class="recItem text-center text-c6 nponter">
							<view class="rec_contain flex flex-direction justify-center p_rlt">
								<view class="recTips text-white text-xs text-center">
									9折
								</view>
								<view class="text-xl text-bold">
									1000
								</view>
								<view class="text-sm margin-top-xs">
									售价12000
								</view>
								<view class="text-sm">
									赠200
								</view>
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
			<view class="full_btn fixed margin-top-sm" @click="confirm">
				充值
			</view>
	</view>
</template>

<script lang="ts" setup>
	import { ref } from "vue";
	import { onLoad,onShow } from '@dcloudio/uni-app';
	import { mnavTo } from '@/utils/helper';
	import { useShopStore } from '@/stores/shopStore';
	const shopStore = useShopStore()
	const techNo=ref('')
  const	balance=ref(66)
  const	rechClass=ref(0)
	const rechargeShop = ref({
		name: '',
		id: ''
	});
	onLoad(() => {
		
	})
	onShow(()=>{
		initParams()
	})
	const	confirm=()=>{
		
	}
	const initParams = () => {
		if (!rechargeShop.value.id || shopStore.rechargeShop.nmember_id) {
			rechargeShop.value.name = shopStore.rechargeShop.vnick || shopStore.shopInfo.vnick || '';
			rechargeShop.value.id = shopStore.rechargeShop.nmember_id || shopStore.shopInfo.nmember_id || '';//shopStore.curSellerMemberId;
			shopStore.rechargeShop.nmember_id && shopStore.setRechargeShop({})
		}
	}
</script>

<style lang="scss">
	.containbox{
		min-height: 100vh;
	}	
	.topfill{
		width: 100vw;
		height: 200rpx;
		background: #56BF7A;
	}
	.centerSection{
		height: calc(100vh - 300rpx);
		width: calc(100vw - 32rpx);
		margin: 20rpx 0 0 16rpx;
		background: #fff;
		box-shadow: 0px 2px 18rpx rgba(0, 0, 0, 0.08);
		border-radius: 8px;
		left: 0;
		top: -150rpx;
	}
	.input2_itm{
		height: 100rpx;
		border-bottom: 1px solid #F3F3F3;
	}
	.iptit{
		width: 180rpx;
	}
	.rechaScrBox{
		height: calc(100% - 250rpx);//240
		.recItem{
			display: inline-block;
			width: 200rpx;
			height: 200rpx;
			background: #F0F0F0;
			border-radius: 16rpx;
			margin:36rpx 36rpx 0 0;
			&:nth-child(3n){
				margin:36rpx 0 0 0;
			}
			&.act{
				color: #fff;
				background: #56BF7A;
			}
		}
		.rec_contain{
			width: 100%;
			height: 100%;
		}
	}
	.recTips{
		min-width: 74rpx;
		height: 28rpx;
		line-height: 29rpx;
		background: linear-gradient(270deg, #FF7A00 0%, #F7B500 151.35%);
		border-radius: 45rpx 32rpx 32rpx 0;
		position: absolute;
		right: -10rpx;
		top: -14rpx;
	}
	
	.plashd{
		color: #D5D5D5;
	}
	
	
	.full_btn{
		width: calc(100vw - 96rpx);
		// margin-left: 38rpx;
	}
</style>
